<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserGoogleSubscribe extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_google_subscribe', function (Blueprint $table) {
            $table->increments('id');
            $table->integer("user_id")->comment("用户id")->default(0);
            $table->integer("product_id")->comment("商品id")->default(0);
            $table->string("order_id")->comment("订单id")->default(0);
            $table->string("package_name")->comment("包名")->default('');
            $table->string("purchase_token")->comment("")->default('');
            $table->integer("start_time")->comment("订阅开始时间")->default(0);
            $table->integer("expiry_time")->comment("订阅结束时间")->default(0);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_google_subscribe');
    }
}
